package org.dromara.system.domain.bo;

import org.dromara.system.domain.Trouble;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 隐患业务对象 trouble
 *
 * @author Lion Li
 * @date 2025-09-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Trouble.class, reverseConvertGenerate = false)
public class TroubleBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 隐患名称
     */
    private String dangerName;

    /**
     * 危险源编码
     */
    @NotBlank(message = "危险源编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String hazardCode;

    /**
     * 管控措施ID
     */
    @NotNull(message = "管控措施ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long riskMeasureId;

    /**
     * 隐患排查记录ID
     */
    @NotNull(message = "隐患排查记录ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long recordId;

    /**
     * 隐患等级：0一般，1重大
     */
    private Long dangerLevel;

    /**
     * 登记时间
     */
    private Date registTime;

    /**
     * 登记人
     */
    private String registrant;

    /**
     * 隐患来源
     */
    private Long dangerSrc;

    /**
     * 执法编号
     */
    @NotBlank(message = "执法编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String enforcementId;

    /**
     * 治理类型：0即查即改，1限期整改
     */
    private Long dangerManageType;

    /**
     * 隐患类型
     */
    private Long hazardDangerType;

    /**
     * 隐患类别
     */
    private Long hazardCategory;

    /**
     * 隐患描述
     */
    private String dangerDesc;

    /**
     * 原因分析
     */
    @NotBlank(message = "原因分析不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dangerReason;

    /**
     * 控制措施
     */
    @NotBlank(message = "控制措施不能为空", groups = { AddGroup.class, EditGroup.class })
    private String controlMeasures;

    /**
     * 整改资金
     */
    @NotBlank(message = "整改资金不能为空", groups = { AddGroup.class, EditGroup.class })
    private String cost;

    /**
     * 整改责任人
     */
    private String liablePerson;

    /**
     * 隐患治理期限
     */
    private Date dangerManageDeadline;

    /**
     * 验收人
     */
    private String checkAcceptPerson;

    /**
     * 验收时间
     */
    @NotNull(message = "验收时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date checkAcceptTime;

    /**
     * 验收情况描述
     */
    @NotBlank(message = "验收情况描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String checkAcceptComment;

    /**
     * 隐患状态：0整改中，1待验收，9已验收
     */
    private Long state;

    /**
     * 整改前照片
     */
    private String attachments1;

    /**
     * 整改后照片
     */
    private String attachments2;


}
